#include <cstdio>

#define sheru2(a) (((int)(a*100+0.5)) / 100.0);
#define myabs(a) (a>0?a:-a)

double r;
int n;

double calc(double a) {
	double div12 = r/1200;
	double remain = 10000.0;
	for (int i=0; i<n; i++) {
		double lx = sheru2(remain * div12);
		remain = remain + lx - a;
	}
	return sheru2(remain);
}

int main() {
	scanf("%lf%d", &r, &n);
	double tmp = 10000.0/n;
	int start = (int)(tmp*100+0.5);
	double previous = calc(start/100.0);
	while (true) {
		start++;
		double curr = calc(start/100.0);
		if (curr < 0) {
			double tprev = myabs(previous);
			double tcurr = myabs(curr);
			if (tprev<=tcurr) {
				printf("%d\n", start-1);
			} else {
				printf("%d\n", start);
			}
			break;
		} else {
			previous = curr;
		}
	}
	return 0;
}
